<%@page session="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@page import="java.sql.*"%>
<%
    String result = ""; 
    String sql = "select * from ca_user where rownum < 10"; 
    String url ="jdbc:oracle:thin:@192.168.29.10:1521:ubsstest";
    String username = "white2"; 
    String password = "white2"; 
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection conn =DriverManager.getConnection(url, username, password); 
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    while ( rs.next() ) {
    result += "\n 第一个字段内容：" +rs.getString(1) + "<BR>";
    }
    rs.close(); 
    stmt.close(); 
    conn.close(); 
%>
<HTML>
<BODY>
<%=result%>
</BODY>
</HTML>
